#ifndef __DIVTP23D3D__
#define __DIVTP23D3D__
#include <stdbool.h>
#include "mesh.h"
#include "enumerations.h"
#include "constants.h"
// ***********************************************************************
// Hdiv P2 element, DIV CONFORMING ELEMENTS OF NÉDÉLEC, 3D
// ***********************************************************************
static INT Div_T_P2_3D_3D_dof[4] = {0, 0, 3, 3};
static INT Div_T_P2_3D_3D_Num_Bas = 15;
static INT Div_T_P2_3D_3D_Value_Dim = 3;
static INT Div_T_P2_3D_3D_Inter_Dim = 1;
static INT Div_T_P2_3D_3D_Polydeg = 2;
static bool Div_T_P2_3D_3D_IsOnlyDependOnRefCoord = 0;
static INT Div_T_P2_3D_3D_Accuracy = 2;
static MAPTYPE Div_T_P2_3D_3D_Maptype = Div;

static void Div_T_P2_3D_3D_InterFun(DOUBLE RefCoord[], INT dim, DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 30 * x * x - 12 * x;
   values[1] = 30 * x * y - 6 * y;
   values[2] = 30 * x * z - 6 * z;
   values[3] = 6 * x + 30 * x * z - 30 * x * x;
   values[4] = 30 * y * z - 30 * x * y;
   values[5] = 30 * z * z - 30 * x * z - 6 * z;
   values[6] = 6 * x + 30 * x * y - 30 * x * x;
   values[7] = 30 * y * y - 30 * x * y - 6 * y;
   values[8] = 30 * y * z - 30 * x * z;
   values[9] = 48 * x + 24 * y + 24 * z - 30 * x * y - 30 * x * z - 30 * x * x - 18;
   values[10] = 24 * y - 30 * x * y - 30 * y * z - 30 * y * y;
   values[11] = 24 * z - 30 * x * z - 30 * y * z - 30 * z * z;
   values[12] = 30 * x * y - 24 * y - 48 * z - 54 * x + 60 * x * z + 30 * x * x + 24;
   values[13] = 30 * x * y - 30 * y + 60 * y * z + 30 * y * y;
   values[14] = 30 * x * z - 36 * z + 30 * y * z + 60 * z * z;
   values[15] = 60 * x * y - 48 * y - 24 * z - 54 * x + 30 * x * z + 30 * x * x + 24;
   values[16] = 30 * x * y - 36 * y + 30 * y * z + 60 * y * y;
   values[17] = 30 * x * z - 30 * z + 60 * y * z + 30 * z * z;
   values[18] = 24 * x - 30 * x * y - 30 * x * z - 30 * x * x;
   values[19] = 24 * x + 48 * y + 24 * z - 30 * x * y - 30 * y * z - 30 * y * y - 18;
   values[20] = 24 * z - 30 * x * z - 30 * y * z - 30 * z * z;
   values[21] = 30 * x * y - 30 * x + 60 * x * z + 30 * x * x;
   values[22] = 30 * x * y - 54 * y - 48 * z - 24 * x + 60 * y * z + 30 * y * y + 24;
   values[23] = 30 * x * z - 36 * z + 30 * y * z + 60 * z * z;
   values[24] = 30 * x * y - 36 * x + 30 * x * z + 60 * x * x;
   values[25] = 60 * x * y - 54 * y - 24 * z - 48 * x + 30 * y * z + 30 * y * y + 24;
   values[26] = 60 * x * z - 30 * z + 30 * y * z + 30 * z * z;
   values[27] = 24 * x - 30 * x * y - 30 * x * z - 30 * x * x;
   values[28] = 24 * y - 30 * x * y - 30 * y * z - 30 * y * y;
   values[29] = 24 * x + 24 * y + 48 * z - 30 * x * z - 30 * y * z - 30 * z * z - 18;
   values[30] = 60 * x * y - 30 * x + 30 * x * z + 30 * x * x;
   values[31] = 30 * x * y - 36 * y + 30 * y * z + 60 * y * y;
   values[32] = 30 * x * z - 48 * y - 54 * z - 24 * x + 60 * y * z + 30 * z * z + 24;
   values[33] = 30 * x * y - 36 * x + 30 * x * z + 60 * x * x;
   values[34] = 60 * x * y - 30 * y + 30 * y * z + 30 * y * y;
   values[35] = 60 * x * z - 24 * y - 54 * z - 48 * x + 30 * y * z + 30 * z * z + 24;
   values[36] = 60 * x - 30 * x * y - 30 * x * z - 60 * x * x;
   values[37] = 30 * y - 60 * x * y - 30 * y * z - 30 * y * y;
   values[38] = 30 * z - 60 * x * z - 30 * y * z - 30 * z * z;
   values[39] = 30 * x - 60 * x * y - 30 * x * z - 30 * x * x;
   values[40] = 60 * y - 30 * x * y - 30 * y * z - 60 * y * y;
   values[41] = 30 * z - 30 * x * z - 60 * y * z - 30 * z * z;
   values[42] = 30 * x - 30 * x * y - 60 * x * z - 30 * x * x;
   values[43] = 30 * y - 30 * x * y - 60 * y * z - 30 * y * y;
   values[44] = 60 * z - 30 * x * z - 30 * y * z - 60 * z * z;
}

static void Div_T_P2_3D_3D_D000(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 30 * x * x - 12 * x;
   values[1] = 30 * x * y - 6 * y;
   values[2] = 30 * x * z - 6 * z;
   values[3] = 6 * x + 30 * x * z - 30 * x * x;
   values[4] = 30 * y * z - 30 * x * y;
   values[5] = 30 * z * z - 30 * x * z - 6 * z;
   values[6] = 6 * x + 30 * x * y - 30 * x * x;
   values[7] = 30 * y * y - 30 * x * y - 6 * y;
   values[8] = 30 * y * z - 30 * x * z;
   values[9] = 48 * x + 24 * y + 24 * z - 30 * x * y - 30 * x * z - 30 * x * x - 18;
   values[10] = 24 * y - 30 * x * y - 30 * y * z - 30 * y * y;
   values[11] = 24 * z - 30 * x * z - 30 * y * z - 30 * z * z;
   values[12] = 30 * x * y - 24 * y - 48 * z - 54 * x + 60 * x * z + 30 * x * x + 24;
   values[13] = 30 * x * y - 30 * y + 60 * y * z + 30 * y * y;
   values[14] = 30 * x * z - 36 * z + 30 * y * z + 60 * z * z;
   values[15] = 60 * x * y - 48 * y - 24 * z - 54 * x + 30 * x * z + 30 * x * x + 24;
   values[16] = 30 * x * y - 36 * y + 30 * y * z + 60 * y * y;
   values[17] = 30 * x * z - 30 * z + 60 * y * z + 30 * z * z;
   values[18] = 24 * x - 30 * x * y - 30 * x * z - 30 * x * x;
   values[19] = 24 * x + 48 * y + 24 * z - 30 * x * y - 30 * y * z - 30 * y * y - 18;
   values[20] = 24 * z - 30 * x * z - 30 * y * z - 30 * z * z;
   values[21] = 30 * x * y - 30 * x + 60 * x * z + 30 * x * x;
   values[22] = 30 * x * y - 54 * y - 48 * z - 24 * x + 60 * y * z + 30 * y * y + 24;
   values[23] = 30 * x * z - 36 * z + 30 * y * z + 60 * z * z;
   values[24] = 30 * x * y - 36 * x + 30 * x * z + 60 * x * x;
   values[25] = 60 * x * y - 54 * y - 24 * z - 48 * x + 30 * y * z + 30 * y * y + 24;
   values[26] = 60 * x * z - 30 * z + 30 * y * z + 30 * z * z;
   values[27] = 24 * x - 30 * x * y - 30 * x * z - 30 * x * x;
   values[28] = 24 * y - 30 * x * y - 30 * y * z - 30 * y * y;
   values[29] = 24 * x + 24 * y + 48 * z - 30 * x * z - 30 * y * z - 30 * z * z - 18;
   values[30] = 60 * x * y - 30 * x + 30 * x * z + 30 * x * x;
   values[31] = 30 * x * y - 36 * y + 30 * y * z + 60 * y * y;
   values[32] = 30 * x * z - 48 * y - 54 * z - 24 * x + 60 * y * z + 30 * z * z + 24;
   values[33] = 30 * x * y - 36 * x + 30 * x * z + 60 * x * x;
   values[34] = 60 * x * y - 30 * y + 30 * y * z + 30 * y * y;
   values[35] = 60 * x * z - 24 * y - 54 * z - 48 * x + 30 * y * z + 30 * z * z + 24;
   values[36] = 60 * x - 30 * x * y - 30 * x * z - 60 * x * x;
   values[37] = 30 * y - 60 * x * y - 30 * y * z - 30 * y * y;
   values[38] = 30 * z - 60 * x * z - 30 * y * z - 30 * z * z;
   values[39] = 30 * x - 60 * x * y - 30 * x * z - 30 * x * x;
   values[40] = 60 * y - 30 * x * y - 30 * y * z - 60 * y * y;
   values[41] = 30 * z - 30 * x * z - 60 * y * z - 30 * z * z;
   values[42] = 30 * x - 30 * x * y - 60 * x * z - 30 * x * x;
   values[43] = 30 * y - 30 * x * y - 60 * y * z - 30 * y * y;
   values[44] = 60 * z - 30 * x * z - 30 * y * z - 60 * z * z;
}
static void Div_T_P2_3D_3D_D100(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 60 * x - 12;
   values[1] = 30 * y;
   values[2] = 30 * z;
   values[3] = 30 * z - 60 * x + 6;
   values[4] = -30 * y;
   values[5] = -30 * z;
   values[6] = 30 * y - 60 * x + 6;
   values[7] = -30 * y;
   values[8] = -30 * z;
   values[9] = 48 - 30 * y - 30 * z - 60 * x;
   values[10] = -30 * y;
   values[11] = -30 * z;
   values[12] = 60 * x + 30 * y + 60 * z - 54;
   values[13] = 30 * y;
   values[14] = 30 * z;
   values[15] = 60 * x + 60 * y + 30 * z - 54;
   values[16] = 30 * y;
   values[17] = 30 * z;
   values[18] = 24 - 30 * y - 30 * z - 60 * x;
   values[19] = 24 - 30 * y;
   values[20] = -30 * z;
   values[21] = 60 * x + 30 * y + 60 * z - 30;
   values[22] = 30 * y - 24;
   values[23] = 30 * z;
   values[24] = 120 * x + 30 * y + 30 * z - 36;
   values[25] = 60 * y - 48;
   values[26] = 60 * z;
   values[27] = 24 - 30 * y - 30 * z - 60 * x;
   values[28] = -30 * y;
   values[29] = 24 - 30 * z;
   values[30] = 60 * x + 60 * y + 30 * z - 30;
   values[31] = 30 * y;
   values[32] = 30 * z - 24;
   values[33] = 120 * x + 30 * y + 30 * z - 36;
   values[34] = 60 * y;
   values[35] = 60 * z - 48;
   values[36] = 60 - 30 * y - 30 * z - 120 * x;
   values[37] = -60 * y;
   values[38] = -60 * z;
   values[39] = 30 - 60 * y - 30 * z - 60 * x;
   values[40] = -30 * y;
   values[41] = -30 * z;
   values[42] = 30 - 30 * y - 60 * z - 60 * x;
   values[43] = -30 * y;
   values[44] = -30 * z;
}
static void Div_T_P2_3D_3D_D010(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 0;
   values[1] = 30 * x - 6;
   values[2] = 0;
   values[3] = 0;
   values[4] = 30 * z - 30 * x;
   values[5] = 0;
   values[6] = 30 * x;
   values[7] = 60 * y - 30 * x - 6;
   values[8] = 30 * z;
   values[9] = 24 - 30 * x;
   values[10] = 24 - 60 * y - 30 * z - 30 * x;
   values[11] = -30 * z;
   values[12] = 30 * x - 24;
   values[13] = 30 * x + 60 * y + 60 * z - 30;
   values[14] = 30 * z;
   values[15] = 60 * x - 48;
   values[16] = 30 * x + 120 * y + 30 * z - 36;
   values[17] = 60 * z;
   values[18] = -30 * x;
   values[19] = 48 - 60 * y - 30 * z - 30 * x;
   values[20] = -30 * z;
   values[21] = 30 * x;
   values[22] = 30 * x + 60 * y + 60 * z - 54;
   values[23] = 30 * z;
   values[24] = 30 * x;
   values[25] = 60 * x + 60 * y + 30 * z - 54;
   values[26] = 30 * z;
   values[27] = -30 * x;
   values[28] = 24 - 60 * y - 30 * z - 30 * x;
   values[29] = 24 - 30 * z;
   values[30] = 60 * x;
   values[31] = 30 * x + 120 * y + 30 * z - 36;
   values[32] = 60 * z - 48;
   values[33] = 30 * x;
   values[34] = 60 * x + 60 * y + 30 * z - 30;
   values[35] = 30 * z - 24;
   values[36] = -30 * x;
   values[37] = 30 - 60 * y - 30 * z - 60 * x;
   values[38] = -30 * z;
   values[39] = -60 * x;
   values[40] = 60 - 120 * y - 30 * z - 30 * x;
   values[41] = -60 * z;
   values[42] = -30 * x;
   values[43] = 30 - 60 * y - 60 * z - 30 * x;
   values[44] = -30 * z;
}
static void Div_T_P2_3D_3D_D001(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 0;
   values[1] = 0;
   values[2] = 30 * x - 6;
   values[3] = 30 * x;
   values[4] = 30 * y;
   values[5] = 60 * z - 30 * x - 6;
   values[6] = 0;
   values[7] = 0;
   values[8] = 30 * y - 30 * x;
   values[9] = 24 - 30 * x;
   values[10] = -30 * y;
   values[11] = 24 - 30 * y - 60 * z - 30 * x;
   values[12] = 60 * x - 48;
   values[13] = 60 * y;
   values[14] = 30 * x + 30 * y + 120 * z - 36;
   values[15] = 30 * x - 24;
   values[16] = 30 * y;
   values[17] = 30 * x + 60 * y + 60 * z - 30;
   values[18] = -30 * x;
   values[19] = 24 - 30 * y;
   values[20] = 24 - 30 * y - 60 * z - 30 * x;
   values[21] = 60 * x;
   values[22] = 60 * y - 48;
   values[23] = 30 * x + 30 * y + 120 * z - 36;
   values[24] = 30 * x;
   values[25] = 30 * y - 24;
   values[26] = 60 * x + 30 * y + 60 * z - 30;
   values[27] = -30 * x;
   values[28] = -30 * y;
   values[29] = 48 - 30 * y - 60 * z - 30 * x;
   values[30] = 30 * x;
   values[31] = 30 * y;
   values[32] = 30 * x + 60 * y + 60 * z - 54;
   values[33] = 30 * x;
   values[34] = 30 * y;
   values[35] = 60 * x + 30 * y + 60 * z - 54;
   values[36] = -30 * x;
   values[37] = -30 * y;
   values[38] = 30 - 30 * y - 60 * z - 60 * x;
   values[39] = -30 * x;
   values[40] = -30 * y;
   values[41] = 30 - 60 * y - 60 * z - 30 * x;
   values[42] = -60 * x;
   values[43] = -60 * y;
   values[44] = 60 - 30 * y - 120 * z - 30 * x;
}
static void Div_T_P2_3D_3D_D200(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 60;
   values[1] = 0;
   values[2] = 0;
   values[3] = -60;
   values[4] = 0;
   values[5] = 0;
   values[6] = -60;
   values[7] = 0;
   values[8] = 0;
   values[9] = -60;
   values[10] = 0;
   values[11] = 0;
   values[12] = 60;
   values[13] = 0;
   values[14] = 0;
   values[15] = 60;
   values[16] = 0;
   values[17] = 0;
   values[18] = -60;
   values[19] = 0;
   values[20] = 0;
   values[21] = 60;
   values[22] = 0;
   values[23] = 0;
   values[24] = 120;
   values[25] = 0;
   values[26] = 0;
   values[27] = -60;
   values[28] = 0;
   values[29] = 0;
   values[30] = 60;
   values[31] = 0;
   values[32] = 0;
   values[33] = 120;
   values[34] = 0;
   values[35] = 0;
   values[36] = -120;
   values[37] = 0;
   values[38] = 0;
   values[39] = -60;
   values[40] = 0;
   values[41] = 0;
   values[42] = -60;
   values[43] = 0;
   values[44] = 0;
}
static void Div_T_P2_3D_3D_D020(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 0;
   values[1] = 0;
   values[2] = 0;
   values[3] = 0;
   values[4] = 0;
   values[5] = 0;
   values[6] = 0;
   values[7] = 60;
   values[8] = 0;
   values[9] = 0;
   values[10] = -60;
   values[11] = 0;
   values[12] = 0;
   values[13] = 60;
   values[14] = 0;
   values[15] = 0;
   values[16] = 120;
   values[17] = 0;
   values[18] = 0;
   values[19] = -60;
   values[20] = 0;
   values[21] = 0;
   values[22] = 60;
   values[23] = 0;
   values[24] = 0;
   values[25] = 60;
   values[26] = 0;
   values[27] = 0;
   values[28] = -60;
   values[29] = 0;
   values[30] = 0;
   values[31] = 120;
   values[32] = 0;
   values[33] = 0;
   values[34] = 60;
   values[35] = 0;
   values[36] = 0;
   values[37] = -60;
   values[38] = 0;
   values[39] = 0;
   values[40] = -120;
   values[41] = 0;
   values[42] = 0;
   values[43] = -60;
   values[44] = 0;
}
static void Div_T_P2_3D_3D_D002(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 0;
   values[1] = 0;
   values[2] = 0;
   values[3] = 0;
   values[4] = 0;
   values[5] = 60;
   values[6] = 0;
   values[7] = 0;
   values[8] = 0;
   values[9] = 0;
   values[10] = 0;
   values[11] = -60;
   values[12] = 0;
   values[13] = 0;
   values[14] = 120;
   values[15] = 0;
   values[16] = 0;
   values[17] = 60;
   values[18] = 0;
   values[19] = 0;
   values[20] = -60;
   values[21] = 0;
   values[22] = 0;
   values[23] = 120;
   values[24] = 0;
   values[25] = 0;
   values[26] = 60;
   values[27] = 0;
   values[28] = 0;
   values[29] = -60;
   values[30] = 0;
   values[31] = 0;
   values[32] = 60;
   values[33] = 0;
   values[34] = 0;
   values[35] = 60;
   values[36] = 0;
   values[37] = 0;
   values[38] = -60;
   values[39] = 0;
   values[40] = 0;
   values[41] = -60;
   values[42] = 0;
   values[43] = 0;
   values[44] = -120;
}
static void Div_T_P2_3D_3D_D110(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 0;
   values[1] = 30;
   values[2] = 0;
   values[3] = 0;
   values[4] = -30;
   values[5] = 0;
   values[6] = 30;
   values[7] = -30;
   values[8] = 0;
   values[9] = -30;
   values[10] = -30;
   values[11] = 0;
   values[12] = 30;
   values[13] = 30;
   values[14] = 0;
   values[15] = 60;
   values[16] = 30;
   values[17] = 0;
   values[18] = -30;
   values[19] = -30;
   values[20] = 0;
   values[21] = 30;
   values[22] = 30;
   values[23] = 0;
   values[24] = 30;
   values[25] = 60;
   values[26] = 0;
   values[27] = -30;
   values[28] = -30;
   values[29] = 0;
   values[30] = 60;
   values[31] = 30;
   values[32] = 0;
   values[33] = 30;
   values[34] = 60;
   values[35] = 0;
   values[36] = -30;
   values[37] = -60;
   values[38] = 0;
   values[39] = -60;
   values[40] = -30;
   values[41] = 0;
   values[42] = -30;
   values[43] = -30;
   values[44] = 0;
}
static void Div_T_P2_3D_3D_D101(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 0;
   values[1] = 0;
   values[2] = 30;
   values[3] = 30;
   values[4] = 0;
   values[5] = -30;
   values[6] = 0;
   values[7] = 0;
   values[8] = -30;
   values[9] = -30;
   values[10] = 0;
   values[11] = -30;
   values[12] = 60;
   values[13] = 0;
   values[14] = 30;
   values[15] = 30;
   values[16] = 0;
   values[17] = 30;
   values[18] = -30;
   values[19] = 0;
   values[20] = -30;
   values[21] = 60;
   values[22] = 0;
   values[23] = 30;
   values[24] = 30;
   values[25] = 0;
   values[26] = 60;
   values[27] = -30;
   values[28] = 0;
   values[29] = -30;
   values[30] = 30;
   values[31] = 0;
   values[32] = 30;
   values[33] = 30;
   values[34] = 0;
   values[35] = 60;
   values[36] = -30;
   values[37] = 0;
   values[38] = -60;
   values[39] = -30;
   values[40] = 0;
   values[41] = -30;
   values[42] = -60;
   values[43] = 0;
   values[44] = -30;
}
static void Div_T_P2_3D_3D_D011(ELEMENT *Elem, DOUBLE Coord[], DOUBLE RefCoord[], DOUBLE *values)
{
   DOUBLE x, y, z;
   x = RefCoord[0];
   y = RefCoord[1];
   z = RefCoord[2];
   values[0] = 0;
   values[1] = 0;
   values[2] = 0;
   values[3] = 0;
   values[4] = 30;
   values[5] = 0;
   values[6] = 0;
   values[7] = 0;
   values[8] = 30;
   values[9] = 0;
   values[10] = -30;
   values[11] = -30;
   values[12] = 0;
   values[13] = 60;
   values[14] = 30;
   values[15] = 0;
   values[16] = 30;
   values[17] = 60;
   values[18] = 0;
   values[19] = -30;
   values[20] = -30;
   values[21] = 0;
   values[22] = 60;
   values[23] = 30;
   values[24] = 0;
   values[25] = 30;
   values[26] = 30;
   values[27] = 0;
   values[28] = -30;
   values[29] = -30;
   values[30] = 0;
   values[31] = 30;
   values[32] = 60;
   values[33] = 0;
   values[34] = 30;
   values[35] = 30;
   values[36] = 0;
   values[37] = -30;
   values[38] = -30;
   values[39] = 0;
   values[40] = -30;
   values[41] = -60;
   values[42] = 0;
   values[43] = -60;
   values[44] = -30;
}
static void Div_T_P2_3D_3D_Nodal(ELEMENT *elem, FUNCTIONVEC *fun, INT dim, DOUBLE *values)
{
   // 直接给出积分格式
   INT NumPoints = 13;
   DOUBLE QuadX213[13] = {0.333333333333000,
                          0.260345966079000,
                          0.260345966079000,
                          0.479308067842000,
                          0.065130102902000,
                          0.065130102902000,
                          0.869739794196000,
                          0.312865496005000,
                          0.638444188570000,
                          0.048690315425000,
                          0.638444188570000,
                          0.312865496005000,
                          0.048690315425000};
   DOUBLE QuadY213[13] = {0.333333333333000,
                          0.260345966079000,
                          0.479308067842000,
                          0.260345966079000,
                          0.065130102902000,
                          0.869739794196000,
                          0.065130102902000,
                          0.638444188570000,
                          0.048690315425000,
                          0.312865496005000,
                          0.312865496005000,
                          0.048690315425000,
                          0.638444188570000};
   DOUBLE QuadW213[13] = {-0.149570044468000,
                          0.175615257433000,
                          0.175615257433000,
                          0.175615257433000,
                          0.053347235609000,
                          0.053347235609000,
                          0.053347235609000,
                          0.077113760890000,
                          0.077113760890000,
                          0.077113760890000,
                          0.077113760890000,
                          0.077113760890000,
                          0.077113760890000};
   INT i, j, k;
   INT num_fun = dim / 3;
   // 这里的法向量是利用$line(ii0->ii1)\times line(ii0->ii2)$生成的（为了保证同一个面在不同单元中自由度是一致的）
   INT ii0[4] = {1, 0, 0, 0};
   INT ii1[4] = {2, 2, 1, 1};
   INT ii2[4] = {3, 3, 3, 2};
   INT ii3[4] = {0, 1, 2, 3};
   INT vert04face[4] = {1, 0, 0, 0};
   INT vert14face[4] = {2, 2, 1, 1};
   INT vert24face[4] = {3, 3, 3, 2};
   DOUBLE vec_line0[3], vec_line1[3], vec_norm[3]; // 面的法向量(按照单元内部的方向)
   DOUBLE *values_temp = malloc(dim * sizeof(DOUBLE));
   DOUBLE coord[3];
   // 面上自由度
   for (i = 0; i < 4; i++)
   {
      for (k = 0; k < num_fun; k++)
      {
         for (j = 0; j < 3; j++)
            values[k + (3 * i + j) * num_fun] = 0.0;
      }
      // 计算面的法向量(并非单位法向量 而是$line(ii0->ii1)\times line(ii0->ii2)$ 向量长度 = 对应面的面积*2)
      vec_line0[0] = elem->Vert_X[ii1[i]] - elem->Vert_X[ii0[i]];
      vec_line0[1] = elem->Vert_Y[ii1[i]] - elem->Vert_Y[ii0[i]];
      vec_line0[2] = elem->Vert_Z[ii1[i]] - elem->Vert_Z[ii0[i]];
      vec_line1[0] = elem->Vert_X[ii2[i]] - elem->Vert_X[ii0[i]];
      vec_line1[1] = elem->Vert_Y[ii2[i]] - elem->Vert_Y[ii0[i]];
      vec_line1[2] = elem->Vert_Z[ii2[i]] - elem->Vert_Z[ii0[i]];
      vec_norm[0] = vec_line0[1] * vec_line1[2] - vec_line0[2] * vec_line1[1];
      vec_norm[1] = vec_line0[2] * vec_line1[0] - vec_line0[0] * vec_line1[2];
      vec_norm[2] = vec_line0[0] * vec_line1[1] - vec_line0[1] * vec_line1[0];
      for (j = 0; j < NumPoints; j++)
      {
         // coord
         coord[0] = (1.0 - QuadX213[j] - QuadY213[j]) * elem->Vert_X[vert04face[i]] + QuadX213[j] * elem->Vert_X[vert14face[i]] + QuadY213[j] * elem->Vert_X[vert24face[i]];
         coord[1] = (1.0 - QuadX213[j] - QuadY213[j]) * elem->Vert_Y[vert04face[i]] + QuadX213[j] * elem->Vert_Y[vert14face[i]] + QuadY213[j] * elem->Vert_Y[vert24face[i]];
         coord[2] = (1.0 - QuadX213[j] - QuadY213[j]) * elem->Vert_Z[vert04face[i]] + QuadX213[j] * elem->Vert_Z[vert14face[i]] + QuadY213[j] * elem->Vert_Z[vert24face[i]];
         // u(t_j)
         fun(coord, dim, values_temp);
         // 面上有三个自由度
         // \int_{f} \vec{u}\cdot \vec{n}df = \sum_j \vec{u}(t_j)cdot \vec{n}\omega_j|f| = \sum_j \vec{u}(t_j)cdot (|f|\vec{n}) \omega_j
         // \int_{f} \vec{u}\cdot \vec{n} \eta df = \sum_j \vec{u}(t_j)cdot \vec{n}\omega_j|f| y_j = \sum_j \vec{u}(t_j)cdot (|f|\vec{n}) \omega_j y_j
         // \int_{f} \vec{u}\cdot \vec{n} \xi df = \sum_j \vec{u}(t_j)cdot \vec{n}\omega_j|f| x_j = \sum_j \vec{u}(t_j)cdot (|f|\vec{n}) \omega_j x_j
         for (k = 0; k < num_fun; k++)
         {
            values[k + (3 * i) * num_fun] += (values_temp[3 * k] * vec_norm[0] + values_temp[3 * k + 1] * vec_norm[1] + values_temp[3 * k + 2] * vec_norm[2]) * QuadW213[j] / 2.0;
            values[k + (3 * i + 1) * num_fun] += (values_temp[3 * k] * vec_norm[0] + values_temp[3 * k + 1] * vec_norm[1] + values_temp[3 * k + 2] * vec_norm[2]) * QuadW213[j] * QuadY213[j] / 2.0;
            values[k + (3 * i + 2) * num_fun] += (values_temp[3 * k] * vec_norm[0] + values_temp[3 * k + 1] * vec_norm[1] + values_temp[3 * k + 2] * vec_norm[2]) * QuadW213[j] * QuadX213[j] / 2.0;
         }
      }
   }
   // 用面3来判断det的正负 混合积 （01\times02）\cdot 03
   if ((vec_norm[0] * (elem->Vert_X[ii3[i]] - elem->Vert_X[ii0[i]]) + vec_norm[1] * (elem->Vert_Y[ii3[i]] - elem->Vert_Y[ii0[i]]) + vec_norm[2] * (elem->Vert_Z[ii3[i]] - elem->Vert_Z[ii0[i]])) > 0)
   {
      elem->is_det_positive = 1;
   }
   else
   {
      elem->is_det_positive = 0;
   }
   // 体上的自由度
   NumPoints = 304;
   DOUBLE QuadX304[304] = {.32967147384406063619375162258031196,
                           1. - 3. * .32967147384406063619375162258031196,
                           .32967147384406063619375162258031196,
                           .32967147384406063619375162258031196,
                           .11204210441737877557977355269085785,
                           1. - 3. * .11204210441737877557977355269085785,
                           .11204210441737877557977355269085785,
                           .11204210441737877557977355269085785,
                           .28044602591109291917326968759374922,
                           1. - 3. * .28044602591109291917326968759374922,
                           .28044602591109291917326968759374922,
                           .28044602591109291917326968759374922,
                           .03942164444076165530186041315194336,
                           1. - 3. * .03942164444076165530186041315194336,
                           .03942164444076165530186041315194336,
                           .03942164444076165530186041315194336,
                           .07491741856476755331936887653337858,
                           .5 - .07491741856476755331936887653337858,
                           .5 - .07491741856476755331936887653337858,
                           .07491741856476755331936887653337858,
                           .07491741856476755331936887653337858,
                           .5 - .07491741856476755331936887653337858,
                           .33569310295563458148449388353009909,
                           .5 - .33569310295563458148449388353009909,
                           .5 - .33569310295563458148449388353009909,
                           .33569310295563458148449388353009909,
                           .33569310295563458148449388353009909,
                           .5 - .33569310295563458148449388353009909,
                           .04904898759556674851708836681755199,
                           .04904898759556674851708836681755199,
                           .76468706758018040128352585522097679,
                           .76468706758018040128352585522097679,
                           1. - 2. * .04904898759556674851708836681755199 - .76468706758018040128352585522097679,
                           1. - 2. * .04904898759556674851708836681755199 - .76468706758018040128352585522097679,
                           .04904898759556674851708836681755199,
                           .04904898759556674851708836681755199,
                           1. - 2. * .04904898759556674851708836681755199 - .76468706758018040128352585522097679,
                           .04904898759556674851708836681755199,
                           .04904898759556674851708836681755199,
                           .76468706758018040128352585522097679,
                           .01412609568309253397023383730394044,
                           .01412609568309253397023383730394044,
                           .23282680458942511289537501209852151,
                           .23282680458942511289537501209852151,
                           1. - 2. * .01412609568309253397023383730394044 - .23282680458942511289537501209852151,
                           1. - 2. * .01412609568309253397023383730394044 - .23282680458942511289537501209852151,
                           .01412609568309253397023383730394044,
                           .01412609568309253397023383730394044,
                           1. - 2. * .01412609568309253397023383730394044 - .23282680458942511289537501209852151,
                           .01412609568309253397023383730394044,
                           .01412609568309253397023383730394044,
                           .23282680458942511289537501209852151,
                           .06239652058154325208658365747436279,
                           .06239652058154325208658365747436279,
                           .28324176830779468643565585504428986,
                           .28324176830779468643565585504428986,
                           1. - 2. * .06239652058154325208658365747436279 - .28324176830779468643565585504428986,
                           1. - 2. * .06239652058154325208658365747436279 - .28324176830779468643565585504428986,
                           .06239652058154325208658365747436279,
                           .06239652058154325208658365747436279,
                           1. - 2. * .06239652058154325208658365747436279 - .28324176830779468643565585504428986,
                           .06239652058154325208658365747436279,
                           .06239652058154325208658365747436279,
                           .28324176830779468643565585504428986,
                           .18909592756965597717224790600688877,
                           .18909592756965597717224790600688877,
                           .01283187405611823970074593204830391,
                           .01283187405611823970074593204830391,
                           1. - 2. * .18909592756965597717224790600688877 - .01283187405611823970074593204830391,
                           1. - 2. * .18909592756965597717224790600688877 - .01283187405611823970074593204830391,
                           .18909592756965597717224790600688877,
                           .18909592756965597717224790600688877,
                           1. - 2. * .18909592756965597717224790600688877 - .01283187405611823970074593204830391,
                           .18909592756965597717224790600688877,
                           .18909592756965597717224790600688877,
                           .01283187405611823970074593204830391,
                           .27501760012954439487094433006628105,
                           .27501760012954439487094433006628105,
                           .38727096031949030862955433360477075,
                           .38727096031949030862955433360477075,
                           1. - 2. * .27501760012954439487094433006628105 - .38727096031949030862955433360477075,
                           1. - 2. * .27501760012954439487094433006628105 - .38727096031949030862955433360477075,
                           .27501760012954439487094433006628105,
                           .27501760012954439487094433006628105,
                           1. - 2. * .27501760012954439487094433006628105 - .38727096031949030862955433360477075,
                           .27501760012954439487094433006628105,
                           .27501760012954439487094433006628105,
                           .38727096031949030862955433360477075,
                           .00594489825256994551853672034278369,
                           .00594489825256994551853672034278369,
                           .03723805935523541954759090988386045,
                           .03723805935523541954759090988386045,
                           1. - 2. * .00594489825256994551853672034278369 - .03723805935523541954759090988386045,
                           1. - 2. * .00594489825256994551853672034278369 - .03723805935523541954759090988386045,
                           .00594489825256994551853672034278369,
                           .00594489825256994551853672034278369,
                           1. - 2. * .00594489825256994551853672034278369 - .03723805935523541954759090988386045,
                           .00594489825256994551853672034278369,
                           .00594489825256994551853672034278369,
                           .03723805935523541954759090988386045,
                           .11830580710999444802339227394482751,
                           .11830580710999444802339227394482751,
                           .74829410783088587547640692441989412,
                           .74829410783088587547640692441989412,
                           1. - 2. * .11830580710999444802339227394482751 - .74829410783088587547640692441989412,
                           1. - 2. * .11830580710999444802339227394482751 - .74829410783088587547640692441989412,
                           .11830580710999444802339227394482751,
                           .11830580710999444802339227394482751,
                           1. - 2. * .11830580710999444802339227394482751 - .74829410783088587547640692441989412,
                           .11830580710999444802339227394482751,
                           .11830580710999444802339227394482751,
                           .74829410783088587547640692441989412,
                           .51463578878883950389557459439302904,
                           .51463578878883950389557459439302904,
                           .39080211141879205490649181473579692,
                           .39080211141879205490649181473579692,
                           1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
                           1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
                           .08011846127872502380489538529429122,
                           .08011846127872502380489538529429122,
                           .39080211141879205490649181473579692,
                           .39080211141879205490649181473579692,
                           1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
                           1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
                           .08011846127872502380489538529429122,
                           .08011846127872502380489538529429122,
                           .51463578878883950389557459439302904,
                           .51463578878883950389557459439302904,
                           1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
                           1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
                           .08011846127872502380489538529429122,
                           .08011846127872502380489538529429122,
                           .51463578878883950389557459439302904,
                           .51463578878883950389557459439302904,
                           .39080211141879205490649181473579692,
                           .39080211141879205490649181473579692,
                           .16457394683790985618365497081112626,
                           .16457394683790985618365497081112626,
                           .06995093322963368912711775566495230,
                           .06995093322963368912711775566495230,
                           1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
                           1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
                           .31025854986272726854690199497600369,
                           .31025854986272726854690199497600369,
                           .06995093322963368912711775566495230,
                           .06995093322963368912711775566495230,
                           1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
                           1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
                           .31025854986272726854690199497600369,
                           .31025854986272726854690199497600369,
                           .16457394683790985618365497081112626,
                           .16457394683790985618365497081112626,
                           1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
                           1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
                           .31025854986272726854690199497600369,
                           .31025854986272726854690199497600369,
                           .16457394683790985618365497081112626,
                           .16457394683790985618365497081112626,
                           .06995093322963368912711775566495230,
                           .06995093322963368912711775566495230,
                           .03435867950145695762069918674064249,
                           .03435867950145695762069918674064249,
                           .85571569922057519215400444464572650,
                           .85571569922057519215400444464572650,
                           1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
                           1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
                           .10852408019289846676496859793631046,
                           .10852408019289846676496859793631046,
                           .85571569922057519215400444464572650,
                           .85571569922057519215400444464572650,
                           1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
                           1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
                           .10852408019289846676496859793631046,
                           .10852408019289846676496859793631046,
                           .03435867950145695762069918674064249,
                           .03435867950145695762069918674064249,
                           1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
                           1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
                           .10852408019289846676496859793631046,
                           .10852408019289846676496859793631046,
                           .03435867950145695762069918674064249,
                           .03435867950145695762069918674064249,
                           .85571569922057519215400444464572650,
                           .85571569922057519215400444464572650,
                           .66253175448505093003700617661466167,
                           .66253175448505093003700617661466167,
                           .01098323448764900444073955046178437,
                           .01098323448764900444073955046178437,
                           1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
                           1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
                           .24838249878149546329329939696635675,
                           .24838249878149546329329939696635675,
                           .01098323448764900444073955046178437,
                           .01098323448764900444073955046178437,
                           1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
                           1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
                           .24838249878149546329329939696635675,
                           .24838249878149546329329939696635675,
                           .66253175448505093003700617661466167,
                           .66253175448505093003700617661466167,
                           1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
                           1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
                           .24838249878149546329329939696635675,
                           .24838249878149546329329939696635675,
                           .66253175448505093003700617661466167,
                           .66253175448505093003700617661466167,
                           .01098323448764900444073955046178437,
                           .01098323448764900444073955046178437,
                           .01226898678006518846085017274454891,
                           .01226898678006518846085017274454891,
                           .01878187449597509734542135006798163,
                           .01878187449597509734542135006798163,
                           1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
                           1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
                           .39600912110670350629865233312005293,
                           .39600912110670350629865233312005293,
                           .01878187449597509734542135006798163,
                           .01878187449597509734542135006798163,
                           1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
                           1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,

                           .39600912110670350629865233312005293,
                           .39600912110670350629865233312005293,
                           .01226898678006518846085017274454891,
                           .01226898678006518846085017274454891,
                           1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
                           1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
                           .39600912110670350629865233312005293,
                           .39600912110670350629865233312005293,
                           .01226898678006518846085017274454891,
                           .01226898678006518846085017274454891,
                           .01878187449597509734542135006798163,
                           .01878187449597509734542135006798163,
                           .20546049913241051283959332798606714,
                           .20546049913241051283959332798606714,
                           .13624495088858952521524101996191479,
                           .13624495088858952521524101996191479,
                           1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
                           1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
                           .06367516197137305787610880659547363,
                           .06367516197137305787610880659547363,
                           .13624495088858952521524101996191479,
                           .13624495088858952521524101996191479,
                           1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
                           1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
                           .06367516197137305787610880659547363,
                           .06367516197137305787610880659547363,
                           .20546049913241051283959332798606714,
                           .20546049913241051283959332798606714,
                           1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
                           1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
                           .06367516197137305787610880659547363,
                           .06367516197137305787610880659547363,
                           .20546049913241051283959332798606714,
                           .20546049913241051283959332798606714,
                           .13624495088858952521524101996191479,
                           .13624495088858952521524101996191479,
                           .46106788607969942837687869968339046,
                           .46106788607969942837687869968339046,
                           .13875357096122530918456923931101452,
                           .13875357096122530918456923931101452,
                           1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
                           1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
                           .17576504661391044061489056539266476,
                           .17576504661391044061489056539266476,
                           .13875357096122530918456923931101452,
                           .13875357096122530918456923931101452,
                           1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
                           1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
                           .17576504661391044061489056539266476,
                           .17576504661391044061489056539266476,
                           .46106788607969942837687869968339046,
                           .46106788607969942837687869968339046,
                           1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
                           1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
                           .17576504661391044061489056539266476,
                           .17576504661391044061489056539266476,
                           .46106788607969942837687869968339046,
                           .46106788607969942837687869968339046,
                           .13875357096122530918456923931101452,
                           .13875357096122530918456923931101452,
                           .01344788610299629067374252417192062,
                           .01344788610299629067374252417192062,
                           .32213983065389956084144880408640740,
                           .32213983065389956084144880408640740,
                           1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
                           1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
                           .47799425320067043636083307018835951,
                           .47799425320067043636083307018835951,
                           .32213983065389956084144880408640740,
                           .32213983065389956084144880408640740,
                           1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
                           1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
                           .47799425320067043636083307018835951,
                           .47799425320067043636083307018835951,
                           .01344788610299629067374252417192062,
                           .01344788610299629067374252417192062,
                           1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
                           1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
                           .47799425320067043636083307018835951,
                           .47799425320067043636083307018835951,
                           .01344788610299629067374252417192062,
                           .01344788610299629067374252417192062,
                           .32213983065389956084144880408640740,
                           .32213983065389956084144880408640740};
   DOUBLE QuadY304[304] = {
       .32967147384406063619375162258031196,
       .32967147384406063619375162258031196,
       1. - 3. * .32967147384406063619375162258031196,
       .32967147384406063619375162258031196,
       .11204210441737877557977355269085785,
       .11204210441737877557977355269085785,
       1. - 3. * .11204210441737877557977355269085785,
       .11204210441737877557977355269085785,
       .28044602591109291917326968759374922,
       .28044602591109291917326968759374922,
       1. - 3. * .28044602591109291917326968759374922,
       .28044602591109291917326968759374922,
       .03942164444076165530186041315194336,
       .03942164444076165530186041315194336,
       1. - 3. * .03942164444076165530186041315194336,
       .03942164444076165530186041315194336,
       .5 - .07491741856476755331936887653337858,
       .07491741856476755331936887653337858,
       .5 - .07491741856476755331936887653337858,
       .5 - .07491741856476755331936887653337858,
       .07491741856476755331936887653337858,
       .07491741856476755331936887653337858,
       .5 - .33569310295563458148449388353009909,
       .33569310295563458148449388353009909,
       .5 - .33569310295563458148449388353009909,
       .5 - .33569310295563458148449388353009909,
       .33569310295563458148449388353009909,
       .33569310295563458148449388353009909,
       .76468706758018040128352585522097679,
       1. - 2. * .04904898759556674851708836681755199 - .76468706758018040128352585522097679,
       .04904898759556674851708836681755199,
       1. - 2. * .04904898759556674851708836681755199 - .76468706758018040128352585522097679,
       .04904898759556674851708836681755199,
       .76468706758018040128352585522097679,
       .04904898759556674851708836681755199,
       1. - 2. * .04904898759556674851708836681755199 - .76468706758018040128352585522097679,
       .04904898759556674851708836681755199,
       .04904898759556674851708836681755199,
       .76468706758018040128352585522097679,
       .04904898759556674851708836681755199,
       .23282680458942511289537501209852151,
       1. - 2. * .01412609568309253397023383730394044 - .23282680458942511289537501209852151,
       .01412609568309253397023383730394044,
       1. - 2. * .01412609568309253397023383730394044 - .23282680458942511289537501209852151,
       .01412609568309253397023383730394044,
       .23282680458942511289537501209852151,
       .01412609568309253397023383730394044,
       1. - 2. * .01412609568309253397023383730394044 - .23282680458942511289537501209852151,
       .01412609568309253397023383730394044,
       .01412609568309253397023383730394044,
       .23282680458942511289537501209852151,
       .01412609568309253397023383730394044,
       .28324176830779468643565585504428986,
       1. - 2. * .06239652058154325208658365747436279 - .28324176830779468643565585504428986,
       .06239652058154325208658365747436279,
       1. - 2. * .06239652058154325208658365747436279 - .28324176830779468643565585504428986,
       .06239652058154325208658365747436279,
       .28324176830779468643565585504428986,
       .06239652058154325208658365747436279,
       1. - 2. * .06239652058154325208658365747436279 - .28324176830779468643565585504428986,
       .06239652058154325208658365747436279,
       .06239652058154325208658365747436279,
       .28324176830779468643565585504428986,
       .06239652058154325208658365747436279,
       .01283187405611823970074593204830391,
       1. - 2. * .18909592756965597717224790600688877 - .01283187405611823970074593204830391,
       .18909592756965597717224790600688877,
       1. - 2. * .18909592756965597717224790600688877 - .01283187405611823970074593204830391,
       .18909592756965597717224790600688877,
       .01283187405611823970074593204830391,
       .18909592756965597717224790600688877,
       1. - 2. * .18909592756965597717224790600688877 - .01283187405611823970074593204830391,
       .18909592756965597717224790600688877,
       .18909592756965597717224790600688877,
       .01283187405611823970074593204830391,
       .18909592756965597717224790600688877,
       .38727096031949030862955433360477075,
       1. - 2. * .27501760012954439487094433006628105 - .38727096031949030862955433360477075,
       .27501760012954439487094433006628105,
       1. - 2. * .27501760012954439487094433006628105 - .38727096031949030862955433360477075,
       .27501760012954439487094433006628105,
       .38727096031949030862955433360477075,
       .27501760012954439487094433006628105,
       1. - 2. * .27501760012954439487094433006628105 - .38727096031949030862955433360477075,
       .27501760012954439487094433006628105,
       .27501760012954439487094433006628105,
       .38727096031949030862955433360477075,
       .27501760012954439487094433006628105,
       .03723805935523541954759090988386045,
       1. - 2. * .00594489825256994551853672034278369 - .03723805935523541954759090988386045,
       .00594489825256994551853672034278369,
       1. - 2. * .00594489825256994551853672034278369 - .03723805935523541954759090988386045,
       .00594489825256994551853672034278369,
       .03723805935523541954759090988386045,
       .00594489825256994551853672034278369,
       1. - 2. * .00594489825256994551853672034278369 - .03723805935523541954759090988386045,
       .00594489825256994551853672034278369,
       .00594489825256994551853672034278369,
       .03723805935523541954759090988386045,
       .00594489825256994551853672034278369,
       .74829410783088587547640692441989412,
       1. - 2. * .11830580710999444802339227394482751 - .74829410783088587547640692441989412,
       .11830580710999444802339227394482751,
       1. - 2. * .11830580710999444802339227394482751 - .74829410783088587547640692441989412,
       .11830580710999444802339227394482751,
       .74829410783088587547640692441989412,
       .11830580710999444802339227394482751,
       1. - 2. * .11830580710999444802339227394482751 - .74829410783088587547640692441989412,
       .11830580710999444802339227394482751,
       .11830580710999444802339227394482751,
       .74829410783088587547640692441989412,
       .11830580710999444802339227394482751,
       .39080211141879205490649181473579692,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .51463578878883950389557459439302904,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .51463578878883950389557459439302904,
       .39080211141879205490649181473579692,
       .39080211141879205490649181473579692,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       .39080211141879205490649181473579692,
       .51463578878883950389557459439302904,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       .51463578878883950389557459439302904,
       .51463578878883950389557459439302904,
       .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       .51463578878883950389557459439302904,
       .06995093322963368912711775566495230,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .16457394683790985618365497081112626,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .16457394683790985618365497081112626,
       .06995093322963368912711775566495230,
       .06995093322963368912711775566495230,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       .06995093322963368912711775566495230,
       .16457394683790985618365497081112626,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       .16457394683790985618365497081112626,
       .16457394683790985618365497081112626,
       .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       .16457394683790985618365497081112626,
       .85571569922057519215400444464572650,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .03435867950145695762069918674064249,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .03435867950145695762069918674064249,
       .85571569922057519215400444464572650,
       .85571569922057519215400444464572650,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       .85571569922057519215400444464572650,
       .03435867950145695762069918674064249,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       .03435867950145695762069918674064249,
       .03435867950145695762069918674064249,
       .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       .03435867950145695762069918674064249,
       .01098323448764900444073955046178437,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .66253175448505093003700617661466167,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .66253175448505093003700617661466167,
       .01098323448764900444073955046178437,
       .01098323448764900444073955046178437,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       .01098323448764900444073955046178437,
       .66253175448505093003700617661466167,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       .66253175448505093003700617661466167,
       .66253175448505093003700617661466167,
       .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       .66253175448505093003700617661466167,
       .01878187449597509734542135006798163,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .01226898678006518846085017274454891,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .01226898678006518846085017274454891,
       .01878187449597509734542135006798163,
       .01878187449597509734542135006798163,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       .01878187449597509734542135006798163,
       .01226898678006518846085017274454891,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       .01226898678006518846085017274454891,
       .01226898678006518846085017274454891,
       .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       .01226898678006518846085017274454891,
       .13624495088858952521524101996191479,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .20546049913241051283959332798606714,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .20546049913241051283959332798606714,
       .13624495088858952521524101996191479,
       .13624495088858952521524101996191479,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       .13624495088858952521524101996191479,
       .20546049913241051283959332798606714,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       .20546049913241051283959332798606714,
       .20546049913241051283959332798606714,
       .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       .20546049913241051283959332798606714,
       .13875357096122530918456923931101452,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .46106788607969942837687869968339046,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .46106788607969942837687869968339046,
       .13875357096122530918456923931101452,
       .13875357096122530918456923931101452,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       .13875357096122530918456923931101452,
       .46106788607969942837687869968339046,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       .46106788607969942837687869968339046,
       .46106788607969942837687869968339046,
       .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       .46106788607969942837687869968339046,
       .32213983065389956084144880408640740,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .01344788610299629067374252417192062,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .01344788610299629067374252417192062,
       .32213983065389956084144880408640740,
       .32213983065389956084144880408640740,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       .32213983065389956084144880408640740,
       .01344788610299629067374252417192062,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       .01344788610299629067374252417192062,
       .01344788610299629067374252417192062,
       .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       .01344788610299629067374252417192062,
   };
   DOUBLE QuadZ304[304] = {
       .32967147384406063619375162258031196,
       .32967147384406063619375162258031196,
       .32967147384406063619375162258031196,
       1. - 3. * .32967147384406063619375162258031196,
       .11204210441737877557977355269085785,
       .11204210441737877557977355269085785,
       .11204210441737877557977355269085785,
       1. - 3. * .11204210441737877557977355269085785,
       .28044602591109291917326968759374922,
       .28044602591109291917326968759374922,
       .28044602591109291917326968759374922,
       1. - 3. * .28044602591109291917326968759374922,
       .03942164444076165530186041315194336,
       .03942164444076165530186041315194336,
       .03942164444076165530186041315194336,
       1. - 3. * .03942164444076165530186041315194336,
       .5 - .07491741856476755331936887653337858,
       .5 - .07491741856476755331936887653337858,
       .07491741856476755331936887653337858,
       .07491741856476755331936887653337858,
       .5 - .07491741856476755331936887653337858,
       .07491741856476755331936887653337858,
       .5 - .33569310295563458148449388353009909,
       .5 - .33569310295563458148449388353009909,
       .33569310295563458148449388353009909,
       .33569310295563458148449388353009909,
       .5 - .33569310295563458148449388353009909,
       .33569310295563458148449388353009909,
       1. - 2. * .04904898759556674851708836681755199 - .76468706758018040128352585522097679,
       .76468706758018040128352585522097679,
       1. - 2. * .04904898759556674851708836681755199 - .76468706758018040128352585522097679,
       .04904898759556674851708836681755199,
       .76468706758018040128352585522097679,
       .04904898759556674851708836681755199,
       1. - 2. * .04904898759556674851708836681755199 - .76468706758018040128352585522097679,
       .04904898759556674851708836681755199,
       .04904898759556674851708836681755199,
       .76468706758018040128352585522097679,
       .04904898759556674851708836681755199,
       .04904898759556674851708836681755199,
       1. - 2. * .01412609568309253397023383730394044 - .23282680458942511289537501209852151,
       .23282680458942511289537501209852151,
       1. - 2. * .01412609568309253397023383730394044 - .23282680458942511289537501209852151,
       .01412609568309253397023383730394044,
       .23282680458942511289537501209852151,
       .01412609568309253397023383730394044,
       1. - 2. * .01412609568309253397023383730394044 - .23282680458942511289537501209852151,
       .01412609568309253397023383730394044,
       .01412609568309253397023383730394044,
       .23282680458942511289537501209852151,
       .01412609568309253397023383730394044,
       .01412609568309253397023383730394044,
       1. - 2. * .06239652058154325208658365747436279 - .28324176830779468643565585504428986,
       .28324176830779468643565585504428986,
       1. - 2. * .06239652058154325208658365747436279 - .28324176830779468643565585504428986,
       .06239652058154325208658365747436279,
       .28324176830779468643565585504428986,
       .06239652058154325208658365747436279,
       1. - 2. * .06239652058154325208658365747436279 - .28324176830779468643565585504428986,
       .06239652058154325208658365747436279,
       .06239652058154325208658365747436279,
       .28324176830779468643565585504428986,
       .06239652058154325208658365747436279,
       .06239652058154325208658365747436279,
       1. - 2. * .18909592756965597717224790600688877 - .01283187405611823970074593204830391,
       .01283187405611823970074593204830391,
       1. - 2. * .18909592756965597717224790600688877 - .01283187405611823970074593204830391,
       .18909592756965597717224790600688877,
       .01283187405611823970074593204830391,
       .18909592756965597717224790600688877,
       1. - 2. * .18909592756965597717224790600688877 - .01283187405611823970074593204830391,
       .18909592756965597717224790600688877,
       .18909592756965597717224790600688877,
       .01283187405611823970074593204830391,
       .18909592756965597717224790600688877,
       .18909592756965597717224790600688877,
       1. - 2. * .27501760012954439487094433006628105 - .38727096031949030862955433360477075,
       .38727096031949030862955433360477075,
       1. - 2. * .27501760012954439487094433006628105 - .38727096031949030862955433360477075,
       .27501760012954439487094433006628105,
       .38727096031949030862955433360477075,
       .27501760012954439487094433006628105,
       1. - 2. * .27501760012954439487094433006628105 - .38727096031949030862955433360477075,
       .27501760012954439487094433006628105,
       .27501760012954439487094433006628105,
       .38727096031949030862955433360477075,
       .27501760012954439487094433006628105,
       .27501760012954439487094433006628105,
       1. - 2. * .00594489825256994551853672034278369 - .03723805935523541954759090988386045,
       .03723805935523541954759090988386045,
       1. - 2. * .00594489825256994551853672034278369 - .03723805935523541954759090988386045,
       .00594489825256994551853672034278369,
       .03723805935523541954759090988386045,
       .00594489825256994551853672034278369,
       1. - 2. * .00594489825256994551853672034278369 - .03723805935523541954759090988386045,
       .00594489825256994551853672034278369,
       .00594489825256994551853672034278369,
       .03723805935523541954759090988386045,
       .00594489825256994551853672034278369,
       .00594489825256994551853672034278369,
       1. - 2. * .11830580710999444802339227394482751 - .74829410783088587547640692441989412,
       .74829410783088587547640692441989412,
       1. - 2. * .11830580710999444802339227394482751 - .74829410783088587547640692441989412,
       .11830580710999444802339227394482751,
       .74829410783088587547640692441989412,
       .11830580710999444802339227394482751,
       1. - 2. * .11830580710999444802339227394482751 - .74829410783088587547640692441989412,
       .11830580710999444802339227394482751,
       .11830580710999444802339227394482751,
       .74829410783088587547640692441989412,
       .11830580710999444802339227394482751,
       .11830580710999444802339227394482751,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .39080211141879205490649181473579692,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .51463578878883950389557459439302904,
       .39080211141879205490649181473579692,
       .51463578878883950389557459439302904,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .39080211141879205490649181473579692,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .51463578878883950389557459439302904,
       1. - .08011846127872502380489538529429122 - .51463578878883950389557459439302904 - .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       .51463578878883950389557459439302904,
       .08011846127872502380489538529429122,
       .39080211141879205490649181473579692,
       .51463578878883950389557459439302904,
       .39080211141879205490649181473579692,
       .08011846127872502380489538529429122,
       .51463578878883950389557459439302904,
       .08011846127872502380489538529429122,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .06995093322963368912711775566495230,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .16457394683790985618365497081112626,
       .06995093322963368912711775566495230,
       .16457394683790985618365497081112626,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .06995093322963368912711775566495230,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .16457394683790985618365497081112626,
       1. - .31025854986272726854690199497600369 - .16457394683790985618365497081112626 - .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       .16457394683790985618365497081112626,
       .31025854986272726854690199497600369,
       .06995093322963368912711775566495230,
       .16457394683790985618365497081112626,
       .06995093322963368912711775566495230,
       .31025854986272726854690199497600369,
       .16457394683790985618365497081112626,
       .31025854986272726854690199497600369,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .85571569922057519215400444464572650,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .03435867950145695762069918674064249,
       .85571569922057519215400444464572650,
       .03435867950145695762069918674064249,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .85571569922057519215400444464572650,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .03435867950145695762069918674064249,
       1. - .10852408019289846676496859793631046 - .03435867950145695762069918674064249 - .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       .03435867950145695762069918674064249,
       .10852408019289846676496859793631046,
       .85571569922057519215400444464572650,
       .03435867950145695762069918674064249,
       .85571569922057519215400444464572650,
       .10852408019289846676496859793631046,
       .03435867950145695762069918674064249,
       .10852408019289846676496859793631046,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .01098323448764900444073955046178437,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .66253175448505093003700617661466167,
       .01098323448764900444073955046178437,
       .66253175448505093003700617661466167,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .01098323448764900444073955046178437,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .66253175448505093003700617661466167,
       1. - .24838249878149546329329939696635675 - .66253175448505093003700617661466167 - .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       .66253175448505093003700617661466167,
       .24838249878149546329329939696635675,
       .01098323448764900444073955046178437,
       .66253175448505093003700617661466167,
       .01098323448764900444073955046178437,
       .24838249878149546329329939696635675,
       .66253175448505093003700617661466167,
       .24838249878149546329329939696635675,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .01878187449597509734542135006798163,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .01226898678006518846085017274454891,
       .01878187449597509734542135006798163,
       .01226898678006518846085017274454891,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .01878187449597509734542135006798163,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .01226898678006518846085017274454891,
       1. - .39600912110670350629865233312005293 - .01226898678006518846085017274454891 - .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       .01226898678006518846085017274454891,
       .39600912110670350629865233312005293,
       .01878187449597509734542135006798163,
       .01226898678006518846085017274454891,
       .01878187449597509734542135006798163,
       .39600912110670350629865233312005293,
       .01226898678006518846085017274454891,
       .39600912110670350629865233312005293,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .13624495088858952521524101996191479,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .20546049913241051283959332798606714,
       .13624495088858952521524101996191479,
       .20546049913241051283959332798606714,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .13624495088858952521524101996191479,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .20546049913241051283959332798606714,
       1. - .06367516197137305787610880659547363 - .20546049913241051283959332798606714 - .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       .20546049913241051283959332798606714,
       .06367516197137305787610880659547363,
       .13624495088858952521524101996191479,
       .20546049913241051283959332798606714,
       .13624495088858952521524101996191479,
       .06367516197137305787610880659547363,
       .20546049913241051283959332798606714,
       .06367516197137305787610880659547363,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .13875357096122530918456923931101452,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .46106788607969942837687869968339046,
       .13875357096122530918456923931101452,
       .46106788607969942837687869968339046,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .13875357096122530918456923931101452,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .46106788607969942837687869968339046,
       1. - .17576504661391044061489056539266476 - .46106788607969942837687869968339046 - .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       .46106788607969942837687869968339046,
       .17576504661391044061489056539266476,
       .13875357096122530918456923931101452,
       .46106788607969942837687869968339046,
       .13875357096122530918456923931101452,
       .17576504661391044061489056539266476,
       .46106788607969942837687869968339046,
       .17576504661391044061489056539266476,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .32213983065389956084144880408640740,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .01344788610299629067374252417192062,
       .32213983065389956084144880408640740,
       .01344788610299629067374252417192062,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .32213983065389956084144880408640740,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .01344788610299629067374252417192062,
       1. - .47799425320067043636083307018835951 - .01344788610299629067374252417192062 - .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       .01344788610299629067374252417192062,
       .47799425320067043636083307018835951,
       .32213983065389956084144880408640740,
       .01344788610299629067374252417192062,
       .32213983065389956084144880408640740,
       .47799425320067043636083307018835951,
       .01344788610299629067374252417192062,
       .47799425320067043636083307018835951,
   };
   DOUBLE QuadW304[304] = {.00403487893723887049265039601220684,
                           .00403487893723887049265039601220684,
                           .00403487893723887049265039601220684,
                           .00403487893723887049265039601220684,
                           .00526342800804762849619159416605960,
                           .00526342800804762849619159416605960,
                           .00526342800804762849619159416605960,
                           .00526342800804762849619159416605960,
                           .01078639106857763822747522856875491,
                           .01078639106857763822747522856875491,
                           .01078639106857763822747522856875491,
                           .01078639106857763822747522856875491,
                           .00189234002903099684224605393918402,
                           .00189234002903099684224605393918402,
                           .00189234002903099684224605393918402,
                           .00189234002903099684224605393918402,
                           .00601451100300045870650067420901317,
                           .00601451100300045870650067420901317,
                           .00601451100300045870650067420901317,
                           .00601451100300045870650067420901317,
                           .00601451100300045870650067420901317,
                           .00601451100300045870650067420901317,
                           .00869219123287302312727334847940610,
                           .00869219123287302312727334847940610,
                           .00869219123287302312727334847940610,
                           .00869219123287302312727334847940610,
                           .00869219123287302312727334847940610,
                           .00869219123287302312727334847940610,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00350762328578499275659307009126951,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00118866227331919807192940951748929,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00434522531446666750864079816261451,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00266068657020316603764648612019192,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00555317430212401341478384714866174,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00015314314053958076996931089638380,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00223120413671567928866289542090939,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00247237715624996985149659692307816,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00659612289181792506876909773112724,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00060043490676974216087269159340661,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00224233099687652742449689510982133,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00082444223624718372748546097521409,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00438801583526791034381358666584691,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00345427842574096232228714634129452,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535,
                           .00392928947333557070846156486164535};

   ComputeElementInvJacobian(elem);
   
   for (k = 0; k < num_fun; k++)
   {
      values[k + 12 * num_fun] = 0.0;
      values[k + 13 * num_fun] = 0.0;
      values[k + 14 * num_fun] = 0.0;
   }
   for (j = 0; j < NumPoints; j++)
   {
      coord[0] = (1-QuadX304[j]-QuadY304[j]-QuadZ304[j])*elem->Vert_X[0]+QuadX304[j]*elem->Vert_X[1]+QuadY304[j]*elem->Vert_X[2]+QuadZ304[j]*elem->Vert_X[3];
      coord[1] = (1-QuadX304[j]-QuadY304[j]-QuadZ304[j])*elem->Vert_Y[0]+QuadX304[j]*elem->Vert_Y[1]+QuadY304[j]*elem->Vert_Y[2]+QuadZ304[j]*elem->Vert_Y[3];
      coord[2] = (1-QuadX304[j]-QuadY304[j]-QuadZ304[j])*elem->Vert_Z[0]+QuadX304[j]*elem->Vert_Z[1]+QuadY304[j]*elem->Vert_Z[2]+QuadZ304[j]*elem->Vert_Z[3];
      // u(t_j)
      fun(coord, dim, values_temp);
      // 面上有三个自由度
      // \int_{A} \vec{u}\cdot (B_K^{-T}[1;0;0]) dA = \sum_j u_j \cdot (B_K^{-T}[1;0;0]) \omega_j |A|
      // \int_{A} \vec{u}\cdot (B_K^{-T}[0;1;0]) dA = \sum_j u_j \cdot (B_K^{-T}[0;1;0]) \omega_j |A|
      // \int_{A} \vec{u}\cdot (B_K^{-T}[0;0;1]) dA = \sum_j u_j \cdot (B_K^{-T}[0;0;1]) \omega_j |A|
      for (k = 0; k < num_fun; k++)
      {
         values[k + 12 * num_fun] += (values_temp[3 * k] * elem->InvJacobian[0][0] + values_temp[3 * k + 1] * elem->InvJacobian[0][1] + values_temp[3 * k + 2] * elem->InvJacobian[0][2]) * QuadW304[j] * elem->Volumn;
         values[k + 13 * num_fun] += (values_temp[3 * k] * elem->InvJacobian[1][0] + values_temp[3 * k + 1] * elem->InvJacobian[1][1] + values_temp[3 * k + 2] * elem->InvJacobian[1][2]) * QuadW304[j] * elem->Volumn;
         values[k + 14 * num_fun] += (values_temp[3 * k] * elem->InvJacobian[2][0] + values_temp[3 * k + 1] * elem->InvJacobian[2][1] + values_temp[3 * k + 2] * elem->InvJacobian[2][2]) * QuadW304[j] * elem->Volumn;
      
      }
   }
   free(values_temp);
}
#endif
